<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.8"/>
<title>embedme: Setting类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">embedme
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.8 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li class="current"><a href="annotated.html"><span>类</span></a></li>
      <li><a href="files.html"><span>文件</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>类列表</span></a></li>
      <li><a href="classes.html"><span>类索引</span></a></li>
      <li><a href="hierarchy.html"><span>类继承关系</span></a></li>
      <li><a href="functions.html"><span>类成员</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="class_setting-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">Setting类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p>一个简单的配置类  
 <a href="class_setting.html#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="_setting_8h_source.html">Setting.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a0424a85686c67883161dd10ca5ed34ad"><td class="memItemLeft" align="right" valign="top">sint32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_setting.html#a0424a85686c67883161dd10ca5ed34ad">open</a> (std::string file)</td></tr>
<tr class="memdesc:a0424a85686c67883161dd10ca5ed34ad"><td class="mdescLeft">&#160;</td><td class="mdescRight">打开配置文件  <a href="#a0424a85686c67883161dd10ca5ed34ad">更多...</a><br /></td></tr>
<tr class="separator:a0424a85686c67883161dd10ca5ed34ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a44d1a33f5ed6330e09a0ae6c536b6a9c"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_setting.html#a44d1a33f5ed6330e09a0ae6c536b6a9c">read</a> (std::string key)</td></tr>
<tr class="memdesc:a44d1a33f5ed6330e09a0ae6c536b6a9c"><td class="mdescLeft">&#160;</td><td class="mdescRight">读取配置项  <a href="#a44d1a33f5ed6330e09a0ae6c536b6a9c">更多...</a><br /></td></tr>
<tr class="separator:a44d1a33f5ed6330e09a0ae6c536b6a9c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3c115982cf6bbb576a953a1384f0142b"><td class="memItemLeft" align="right" valign="top">sint32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_setting.html#a3c115982cf6bbb576a953a1384f0142b">write</a> (std::string key, std::string value)</td></tr>
<tr class="memdesc:a3c115982cf6bbb576a953a1384f0142b"><td class="mdescLeft">&#160;</td><td class="mdescRight">修改配置项  <a href="#a3c115982cf6bbb576a953a1384f0142b">更多...</a><br /></td></tr>
<tr class="separator:a3c115982cf6bbb576a953a1384f0142b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abad4f7885758e089a80030086a188b3b"><td class="memItemLeft" align="right" valign="top">sint32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_setting.html#abad4f7885758e089a80030086a188b3b">close</a> ()</td></tr>
<tr class="memdesc:abad4f7885758e089a80030086a188b3b"><td class="mdescLeft">&#160;</td><td class="mdescRight">关闭配置文件,此操作会重写并保存配置文件  <a href="#abad4f7885758e089a80030086a188b3b">更多...</a><br /></td></tr>
<tr class="separator:abad4f7885758e089a80030086a188b3b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>一个简单的配置类 </p>
</div><h2 class="groupheader">成员函数说明</h2>
<a class="anchor" id="abad4f7885758e089a80030086a188b3b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">sint32 Setting::close </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>关闭配置文件,此操作会重写并保存配置文件 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">void</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>成功返回STATUS_OK,失败返回STATUS_ERROR </dd></dl>
<dl class="section note"><dt>注解</dt><dd>none </dd></dl>

</div>
</div>
<a class="anchor" id="a0424a85686c67883161dd10ca5ed34ad"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">sint32 Setting::open </td>
          <td>(</td>
          <td class="paramtype">std::string&#160;</td>
          <td class="paramname"><em>file</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>打开配置文件 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">file</td><td>配置文件名 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>成功返回STATUS_OK,失败返回STATUS_ERROR </dd></dl>
<dl class="section note"><dt>注解</dt><dd>none </dd></dl>

</div>
</div>
<a class="anchor" id="a44d1a33f5ed6330e09a0ae6c536b6a9c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string Setting::read </td>
          <td>(</td>
          <td class="paramtype">std::string&#160;</td>
          <td class="paramname"><em>keyStr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>读取配置项 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">keyStr</td><td>key名称 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>成功返回key对应的value字串,失败返回空字符串 </dd></dl>
<dl class="section note"><dt>注解</dt><dd>none </dd></dl>

</div>
</div>
<a class="anchor" id="a3c115982cf6bbb576a953a1384f0142b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">sint32 Setting::write </td>
          <td>(</td>
          <td class="paramtype">std::string&#160;</td>
          <td class="paramname"><em>keyStr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string&#160;</td>
          <td class="paramname"><em>valueStr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>修改配置项 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">keyStr</td><td>key名称 </td></tr>
    <tr><td class="paramname">valueStr</td><td>value字符串 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>成功返回STATUS_OK,失败返回STATUS_ERROR </dd></dl>
<dl class="section note"><dt>注解</dt><dd>修改配置项后并不立即写入文件中,而是要等待close时才写入 </dd></dl>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>libemb/inc/<a class="el" href="_setting_8h_source.html">Setting.h</a></li>
<li>libemb/src/Setting.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
生成于 2016年 一月 12日 星期二 15:48:38 , 为 embedme使用  &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.8
</small></address>
</body>
</html>
